home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / MW MPW Binaries 1.1.1a2 / mwcPPC / MWCIncludes / unix.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-26  |  1.3 KB  |  58 lines  |  [TEXT/MMCC]

  1. /************************************************************************/
  2. /*    Project...:    Standard ANSI-C Library                                    */
  3. /*    Name......:    unix.h                                                    */
  4. /*    Purpose...:    standard ANSI header file                                */
  5. /*  Copyright.: ©Copyright 1994 by metrowerks inc. All rights reserved. */
  6. /************************************************************************/
  7.  
  8. /*
  9.  *    NB:    This file implements some UNIX low level support.  These functions
  10.  *        are not guaranteed to be 100% conformant.
  11.  */
  12.  
  13. #ifndef    _UNIX
  14. #define    _UNIX
  15.  
  16. #if __MWERKS__
  17. #pragma options align=mac68k
  18. #endif
  19.  
  20. #ifndef _STDIO
  21. #include <stdio.h>
  22. #endif
  23.  
  24. /*
  25.  * Mode values accessible to __open()
  26.  */
  27.  
  28. #define O_RDWR            0x0
  29. #define O_RDONLY        0x1
  30. #define O_WRONLY        0x2
  31. #define O_CREAT            0x0100
  32. #define O_TRUNC            0x0200
  33. #define O_APPEND        0x0800
  34. #define O_BINARY        0x8000
  35.  
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39.  
  40. int __open(const char *filename, int mode);
  41. int __close(int fd);
  42. int __read(int fd, unsigned char *buf, int count);
  43. int __write(int fd, const unsigned char *buf, int count);
  44. long __lseek(int fd, long offset, int whence);
  45. int __unlink(const char *filename);
  46. int _Fwrite(FILE *stream, const unsigned char *buf, int count);
  47. int _Fread(FILE *stream, unsigned char *buf, int count);
  48.  
  49. #ifdef __cplusplus
  50. }
  51. #endif
  52.  
  53. #if __MWERKS__
  54. #pragma options align=reset
  55. #endif
  56.  
  57. #endif
  58.